package com.example.j2025_11_10.mapper;
import com.example.j2025_11_10.Model.BookInfo;
import com.example.j2025_11_10.Model.PageInfo;
import com.example.j2025_11_10.Model.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import java.util.List;

@Mapper
public interface GetBookByPageMapper {
    @Select("SELECT * FROM book_info WHERE `status` = 1 LIMIT #{offset},#{pageSize}")
    List<BookInfo> getList(PageInfo pageInfo);
    @Select("SELECT COUNT(1) FROM book_info WHERE `status` <> 0 ")
    Integer getCount();
}
